<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <!--适应移动端-->
    <meta name="viewport" content="width=device-width,initial-scale=1.0 ">
    <title>巨人的风车-管理后台页面</title>
    <link rel="stylesheet" th:href="@{/Semantic-UI-2.4.1/dist/semantic.min.css}">
    <link rel="stylesheet" th:href="@{/css/me.css}">
    <!--图标-->
    <link rel='stylesheet prefetch' href='https://cdnjs.cloudflare.com/ajax/libs/semantic-ui/2.4.1/components/icon.min.css'>
</head>
<body>
<!--引入隐藏背景资源-->
<img th:src="@{/images/beijing.jpg}" class="m-hidden" alt="">
<br>
<br>
<br>
<br>
<br>
<br>
<br>
<br>
<br>
<br>
<div class="m-container-small m-padded-tb-massive " style="max-width: 30em !important;">
    <div class="ur container">
        <div class="ui middle aligned center aligned grid">
            <div class="column">
                <h2 class="ui teal image header">
                    <img th:src="@{/images/ren.jpg}" class="image">
                    <div class="content"><font style="vertical-align: inherit;"><font style="vertical-align: inherit;color: black">
                        管理后台登录
                    </font></font></div>
                </h2>
                <form class="ui large form" method="post"  th:action="@{/admin/login}">
                    <div class="ui segment">
                        <div class="field">
                            <div class="ui left icon input">
                                <i class="user icon"></i>
                                <input type="text" name="username" placeholder="用户名">
                            </div>
                        </div>
                        <div class="field">
                            <div class="ui left icon input">
                                <i class="lock icon"></i>
                                <input type="password" name="password" placeholder="密码">
                            </div>
                        </div>
                        <button class="ui fluid large teal submit button"><font style="vertical-align: inherit;"><font style="vertical-align: inherit;">登录</font></font></button>
                    </div>

                    <div class="ui error mini message"></div>
                        <div class="ui mini negative message" th:unless="${#strings.isEmpty(message)}" th:text="${message}">用户名和密码错误</div>
                </form>

            </div>
        </div>
    </div>
</div>

<script th:src="@{/js/jquery-3.5.1.min.js}"></script>
<script th:src="@{/Semantic-UI-2.4.1/dist/semantic.min.js}"></script>
<script>
    $('.ui.form').form({
        fields:{
            username:{
                identifier: 'username',
                rules:[{
                    type:'empty',
                    prompt:'请输入用户名'
                }]
            },
            password:{
                identifier: 'password',
                rules:[{
                    type:'empty',
                    prompt:'请输入密码'
                }]
            }
        }
    })
</script>
</body>
</html>